using System;
using System.Data;
using System.Collections.Generic;
using Soccer.Core;
using Soccer.Utility;

namespace Soccer.Business
{
    [TableAttribute("EuroPredicts")]
	[Serializable]
    public class EuroPredict : DBO<EuroPredict>
    {
		#region Fields
		
		private int? _IdEuroPredict;
		private int? _IdMatch;
		private int? _IdUser;
		private int? _Predict;
		
		#endregion
		
		#region Constructors
		/// <summary>
		/// Default constructor
		/// </summary>
		public EuroPredict()
		{
			
		}
		
		/// <summary>
		/// Constructor with IdEuroPredict 
		/// </summary>
		/// <param name="IdEuroPredict">The IdEuroPredict</param>
		public EuroPredict(int? IdEuroPredict )
		{
			this.IdEuroPredict = IdEuroPredict;
		}
		
		/// <summary>
		/// Constructor with all parameters
		/// </summary>
		/// <param name="IdEuroPredict">Sets int? value for IdEuroPredict</param>
		/// <param name="IdMatch">Sets int? value for IdMatch</param>
		/// <param name="IdUser">Sets int? value for IdUser</param>
		/// <param name="Predict">Sets int? value for Predict</param>
		public EuroPredict(int? idEuroPredict, int? idMatch, int? idUser, int? predict)
		{
			this.IdEuroPredict = idEuroPredict;
			this.IdMatch = idMatch;
			this.IdUser = idUser;
			this.Predict = predict;
		}
		
		#endregion
		
		#region Properties
		
		/// <summary>
		/// Gets or sets int? value for IdEuroPredict
		/// </summary>
		[ColumnAttribute("IdEuroPredict", SqlDbType.Int , 4 , true, true, false)]
		public int? IdEuroPredict
		{
			set
			{
				this._IdEuroPredict = value;
			}
			get
			{
				return this._IdEuroPredict;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for IdMatch
		/// </summary>
		[ColumnAttribute("IdMatch", SqlDbType.Int , 4 , false, false, true)]
		public int? IdMatch
		{
			set
			{
				this._IdMatch = value;
			}
			get
			{
				return this._IdMatch;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for IdUser
		/// </summary>
		[ColumnAttribute("IdUser", SqlDbType.Int , 4 , false, false, true)]
		public int? IdUser
		{
			set
			{
				this._IdUser = value;
			}
			get
			{
				return this._IdUser;
			}
		}
		
		/// <summary>
		/// Gets or sets int? value for Predict
		/// </summary>
		[ColumnAttribute("Predict", SqlDbType.Int , 4 , false, false, true)]
		public int? Predict
		{
			set
			{
				this._Predict = value;
			}
			get
			{
				return this._Predict;
			}
		}
		
		
		/// <summary>
		/// Get a Match of current EuroPredict object base on IdMatch
		/// </summary>
		public Match Match
		{
			get
			{
				if (this.IdMatch == null)
					return null;
	
				Match condition = new Match(this.IdMatch);
				return MatchController.FindItem(condition);
			}
		}
		
		/// <summary>
		/// Get a User of current EuroPredict object base on IdUser
		/// </summary>
		public User User
		{
			get
			{
				if (this.IdUser == null)
					return null;
	
				User condition = new User(this.IdUser);
				return UserController.FindItem(condition);
			}
		}
		
		#endregion
        
        #region Other Properties
        private static ColumnNameStruct? _ColumnName;
        public static ColumnNameStruct ColumnName
        {
            get
            {
                if (!_ColumnName.HasValue)
                    _ColumnName = new ColumnNameStruct();
                return _ColumnName.Value;
            }
        }
        #endregion

        #region NestedType
        public  struct ColumnNameStruct
        {
            /// <summary>
            /// Get the name of column [IdEuroPredict]
            /// </summary>
            public string IdEuroPredict
            {
                get
                {
                    return "IdEuroPredict";
                }
            }
            /// <summary>
            /// Get the name of column [IdMatch]
            /// </summary>
            public string IdMatch
            {
                get
                {
                    return "IdMatch";
                }
            }
            /// <summary>
            /// Get the name of column [IdUser]
            /// </summary>
            public string IdUser
            {
                get
                {
                    return "IdUser";
                }
            }
            /// <summary>
            /// Get the name of column [Predict]
            /// </summary>
            public string Predict
            {
                get
                {
                    return "Predict";
                }
            }
        }
        #endregion
    }
}
